package jp.co.sharp.android.parents.kidsguard.activity.home;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.Html;
import android.text.method.ScrollingMovementMethod;
import android.view.View;
import android.widget.TextView;

import jp.co.sharp.android.parents.kidsguard.R;

public class SourceLicenseActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_source_license);

        TextView sourceLicense = (TextView)findViewById(R.id.sourceLicense);
        sourceLicense.setText(Html.fromHtml(getString(R.string.open_source_license)));
        sourceLicense.setMovementMethod(ScrollingMovementMethod.getInstance());
    }

    /**
     * ページリターンキー、フルスクリーンリターンジェスチャー
     */
    @Override
    public void onBackPressed() {
        backActivity(null);
    }

    /**
     *
     */
    public void backActivity(View view) {
        Intent intent = new Intent();
        intent.setClass(SourceLicenseActivity.this, HomeActivity.class);
        startActivity(intent);
    }
}
